#ifndef DATABASE_H
#define DATABASE_H
#include <QList>
#include <QString>
#include <QObject>
#include "playlist.h"
#include "pugixml.hpp"

class Database : public QObject
{
    Q_OBJECT

    public:
        static Database* get();
        QList<QString> getPlaylists();
        Playlist getPlaylist(QString name);
        void changeVideoAttribute(QString playlist, QString id, QString attributeName, QString attributeValue);

    public slots:
        void deleteSongFromPlaylist(VideoInfo song);
        void addNewSong(QString playlistname, VideoInfo song);
        void addNewPlaylist(QString name);

    private:
        Database();
        static Database* database;
        pugi::xml_document lib;
};

#endif // DATABASE_H
